USE TTTLINES2014
GO

SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
GO
PRINT 'copio il contenuto di config_excel_table'
go
insert into config_excel_table (chiave, etichetta, ordine, id_report, inserisci, bean)
	select chiave, etichetta, ordine, id_report, inserisci, bean from config_excel_table_tmp
IF @@ERROR<>0 ROLLBACK TRANSACTION
select * from config_excel_table
go
PRINT 'Cancello la tabella temporanea config_excel_table_tmp'
go
drop table config_excel_table_tmp
go
print 'Cancello la tabella temporanea del 2013'
GO
DROP TABLE [TTTLines2013].[dbo].[config_excel_table_tmp]
GO
COMMIT TRANSACTION
GO